/** 
模板
 **/
package com.centon.auto_code.project.controller;

import com.centon.auto_code.project.service.ProModuleService;
import com.centon.auto_code.project.vo.ProModuleVo;
import com.centon.auto_code.vo.BaseRes;
import java.util.List;
import javax.annotation.Title;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.validation.BindingResult;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

@Controller
@RequestMapping("adapi/module")
public class ProModuleController {

    @Autowired
    private ProModuleService proModuleService;


    /**
     * @gen_399_lwl
     * 查询模块列表
     * 查询模块列表
     * @param proModuleVo
    **/
    @Title("查询模块列表")
    @ResponseBody
    @RequestMapping(value="/querylist", method=RequestMethod.POST)
    public BaseRes<List<ProModuleVo>> queryList(@RequestBody ProModuleVo proModuleVo, BindingResult bindingResult) {
        return proModuleService.queryList(proModuleVo);
    }

    /**
     * @gen_400_lwl
     * 添加模板
     * 添加模板
     * @param proModuleVo
    **/
    @Title("添加模板")
    @ResponseBody
    @RequestMapping(value="/add", method=RequestMethod.POST)
    public BaseRes<String> addModule(@RequestBody ProModuleVo proModuleVo, BindingResult bindingResult) {
        return proModuleService.addModule(proModuleVo);
    }

    /**
     * @gen_401_lwl
     * 修改模板信息
     * 修改模板信息
     * @param proModuleVo
    **/
    @Title("修改模板信息")
    @ResponseBody
    @RequestMapping(value="/update", method=RequestMethod.POST)
    public BaseRes<String> updateModule(@RequestBody ProModuleVo proModuleVo, BindingResult bindingResult) {
        return proModuleService.updateModule(proModuleVo);
    }

    /**
     * @gen_402_lwl
     * 删除模板
     * 删除模板
     * @param proModuleVo
    **/
    @Title("删除模板")
    @ResponseBody
    @RequestMapping(value="/delete", method=RequestMethod.POST)
    public BaseRes<String> deleModule(@RequestBody ProModuleVo proModuleVo, BindingResult bindingResult) {
        return proModuleService.deleModule(proModuleVo);
    }

    /**
     * @gen_403_lwl
     * 模板详情
     * 模板详情
     * @param proModuleVo
    **/
    @Title("模板详情")
    @ResponseBody
    @RequestMapping(value="/detail", method=RequestMethod.POST)
    public BaseRes<ProModuleVo> moduleDetail(@RequestBody ProModuleVo proModuleVo, BindingResult bindingResult) {
        return proModuleService.moduleDetail(proModuleVo);
    }
}